package com.example.demo.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * @author wan
 * @version 1.0.0
 * @Description 为本地书库页面服务
 * @createTime 2021年08月24日 10:00:07
 */
@WebServlet("/BackColorManage")
public class BackColorManage extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        int pageNum = (int) session.getAttribute("pageNum");
        session.setAttribute("pageNum", pageNum - 1);
        request.setAttribute("backColor", request.getParameter("backColor"));
        HelloNovel helloNovel = new HelloNovel();
        helloNovel.doPost(request, response);
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }
}
